package com.it.mapper;

import com.it.pojo.Classes;
import com.it.pojo.Team;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface TeamMapper {

    @Select("select id, tname, cid from team where cid=#{cid}")
    List<Team> getAll(Integer cid);

    @Insert("insert into team(tname, cid) values(#{tname}, #{cid})")
    void add(Team team);

    @Update("update team set tname = #{tname} where id = #{id}")
    void update(Team team);

    @Delete("delete from team where id = #{id}")
    void delete(Integer id);

}
